libname motind3R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R';

libname ind3R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\independents\ind3R';
libname dem3R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\democrats\dem3R';
libname rep3R 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\republicans\rep3R';

data motind3R.all; set ind3R.all dem3R.all rep3R.all; run;

proc freq data=motind3R.all; table partyid forcedparty; run;
proc freq data=ind3R.all; table partyid forcedparty; run;
proc freq data=dem3R.all; table partyid forcedparty; run;
proc freq data=rep3R.all; table partyid forcedparty; run;


**********************************CLEANING DATA**************************************;

*coding edu as continuous;
data motind3R.all; set motind3R.all;
format education 1.;
if edu = 1 then education = 1; *elementary school;
else if edu = 2 then education = 2; *junior high;
else if edu = 3 then education = 3; *some high school;
else if edu = 4 then education = 4; *high school graduate;
else if edu in (5,6) then education = 5; *some college and associate's degree;
else if edu = 7 then education = 6; *bachelor's degree;
else if edu in (8,9,14) then education = 7; *some graduate school, master's degree, MBA;
else if edu in (10,11,13) then education = 8; *JD, MD, other advanced degree;
else if edu = 12 then education = 9; run; *PhD;

proc freq data=motind3R.all; table citizen; run;

*getting rid of non-US citizens - asked for this, but didn't get it;
data motind3R.all; set motind3R.all; 
if citizen NE "us" then delete; run;
*71 subjects deleted;

TITLE 'Completers vs Noncompleters';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Completers vs Noncompleters.html';
data motind3R.all; set motind3R.all; 
if consented = . then delete; 
if debriefed = . then debriefed = 0; run;
proc ttest data=motind3R.all; class debriefed; var age edu; run;
proc freq data=motind3R.all; 
tables gender*debriefed  / chisq ; run;

ODS HTML CLOSE;
*81 deleted for not consenting;

*getting rid of people who did not complete the 2 main DVs;
data motind3R.all; set motind3R.all; 
if planiat = . then delete; 
if planprefer = . then delete; run;
*701 subjects deleted;

*recoding variables;
data motind3R.all; set motind3R.all; 
socialpolitics = .;
if socpolitics = 1 then socialpolitics = 3; 
else if socpolitics = 2 then socialpolitics = 2; 
else if socpolitics = 3 then socialpolitics = 1; 
else if socpolitics = 4 then socialpolitics = 0; 
else if socpolitics = 5 then socialpolitics = -1; 
else if socpolitics = 6 then socialpolitics = -2; 
else if socpolitics = 7 then socialpolitics = -3; run;

data motind3R.all; set motind3R.all; 
economicpolitics = .;
if econpolitics = 1 then economicpolitics = 3; 
else if econpolitics = 2 then economicpolitics = 2; 
else if econpolitics = 3 then economicpolitics = 1; 
else if econpolitics = 4 then economicpolitics = 0; 
else if econpolitics = 5 then economicpolitics = -1; 
else if econpolitics = 6 then economicpolitics = -2; 
else if econpolitics = 7 then economicpolitics = -3; run;

data motind3R.all; set motind3R.all; 
partyforce = .;
if forcedparty = 1 then partyforce = -3; 
else if forcedparty = 2 then partyforce = -2; 
else if forcedparty = 3 then partyforce = -1; 
else if forcedparty = 4 then partyforce = 0; 
else if forcedparty = 5 then partyforce = 1; 
else if forcedparty = 6 then partyforce = 2; 
else if forcedparty = 7 then partyforce = 3; run;

data motind3R.all; set motind3R.all; 
informat majorparty $3.;
majorparty = "."; 
if partyid = 1 then majorparty = "Dem"; 
else if partyid = 2 then majorparty = "Rep"; 
else if partyid = 3 then majorparty = "Ind"; run;

data motind3R.all; set motind3R.all; 
informat indforce $9.;
indforce = "."; 
if partyforce in (1,2,3) then indforce = "DemInd"; 
else if partyforce = 0 then indforce = "StrongInd"; 
else if partyforce in (-1,-2,-3) then indforce = "RepInd"; run;

data motind3R.all; set motind3R.all; 
detailsinfluenced = howdetails; run;

data motind3R.all; set motind3R.all; 
prefermain = .;
if planprefer = 1 then prefermain = -3; 
else if planprefer = 2 then prefermain = -2; 
else if planprefer = 3 then prefermain = -1; 
else if planprefer = 4 then prefermain = 0; 
else if planprefer = 5 then prefermain = 1; 
else if planprefer = 6 then prefermain = 2; 
else if planprefer = 7 then prefermain = 3; run;

proc means data=motind3R.all; var prefermain planprefer; run;
proc corr data=motind3R.all; var prefermain planprefer; run;

data motind3R.all; set motind3R.all; 
poliat = 0 - politicsiat; run;

data motind3R.all; set motind3R.all; 
informat poliatbin $19.;
poliatbin = "."; 
if poliat > .15 then poliatbin = "Implicit Democrat";
else if poliat < -.15 then poliatbin = "Implicit Republican"; run;

data motind3R.all; set motind3R.all; 
informat recallright $5.; 
recallright = ".";

if cogloadmanip = "load" then do;

recallright = "fail"; 
if recall = 6914954 then recallright = "pass"; 
else if recall = . then recallright = "blank"; end;  run;

data motind3R.all; set motind3R.all; 
conditionnum = .; 
if condition = "dem" then conditionnum = .5; 
else if condition = "rep" then conditionnum = -.5; run;

data motind3R.all; set motind3R.all; 
if partyinfluenced = 1 then aware = -.5; 
else if partyinfluenced in (2,3,4,5) then aware = .5; run;

data motind3R.all; set motind3R.all; 
if cogloadmanip = "control" then cogloadnum = -.5; 
else if cogloadmanip = "load" then cogloadnum = .5; run;

proc contents data=motind3R.all; run;
proc means data=motind3R.all; run;


************************************************************************
CLEAN DATASET INCLUDES XXX who:
only us citizens 
only people who completed both 2 DVs 

RETAINED PEOPLE who:
failed the IMC
************************************************************************;

**********************************Sample Characteristics**************************************;

TITLE 'Combined Sample Characteristics';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Combined Sample Characteristics.html';

proc freq data=motind3R.all;
tables gender racecen ethniccen citizen partyid; run;

proc univariate data=motind3R.all; var education edu; run;
proc freq data=motind3R.all; table education edu; run;

proc means data=motind3R.all; 
var relID socialpolitics economicpolitics poliat age; run;

proc sort data=motind3R.all; by majorparty;

proc freq data=motind3R.all; by majorparty; 
tables gender racecen ethniccen citizen partyid edu; run;

proc means data=motind3R.all; by majorparty;
var relID socialpolitics economicpolitics poliat age; run;

ODS HTML CLOSE;


/**************main analyses deleting people who failed manip checks****************/

TITLE 'Main Analysis with Study Manip Check Failures Removed';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Main Analysis with Study Manip Check Failures Removed.html';

data motind3R.manip; set motind3R.all; run;

data motind3R.manip; set motind3R.manip; 
if condition = "rep" AND manip1 = 2 then delete; run;  *129;

data motind3R.manip; set motind3R.manip; 
if condition = "dem" AND manip1 = 1 then delete; run; *132;

data motind3R.manip; set motind3R.manip; 
if manip2 = 1 then delete; run; *65;

proc sort data=motind3R.manip; by majorparty; 

proc ttest data=motind3R.manip; by majorparty; 
class condition; var prefermain planiat; run;

proc glm data=motind3R.manip (where=(majorparty="Ind")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=motind3R.manip (where=(majorparty="Ind")); 
class condition;
model planiat=condition|poliat; run;

proc glm data=motind3R.manip (where=(indforce="StrongInd")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=motind3R.manip (where=(indforce="StrongInd")); 
class condition;
model planiat=condition|poliat; run;

proc sort data=motind3R.manip; by majorparty; 

proc means data=motind3R.manip ; by majorparty; 
class poliatbin condition; 
var planiat prefermain; run;

ODS HTML CLOSE;


TITLE 'Main Analysis with IMC Failures Removed';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Main Analysis with IMC Failures Removed.html';

data motind3R.IMC; set motind3R.all;
if IMC = 0 then delete; run;
*deleted 628;

proc freq data=motind3R.IMC; table IMC; run; 

proc sort data=motind3R.IMC; by majorparty; 

proc ttest data=motind3R.IMC; by majorparty; 
class condition; var prefermain planiat; run;

proc glm data=motind3R.IMC (where=(majorparty="Ind")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=motind3R.IMC (where=(majorparty="Ind")); 
class condition;
model planiat=condition|poliat; run;

proc glm data=motind3R.IMC (where=(indforce="StrongInd")); 
class condition;
model prefermain=condition|poliat; run;

proc glm data=motind3R.IMC (where=(indforce="StrongInd")); 
class condition;
model planiat=condition|poliat; run;

proc sort data=motind3R.IMC; by majorparty; 

proc means data=motind3R.IMC ; by majorparty; 
class poliatbin condition; 
var planiat prefermain; run;

ODS HTML CLOSE;


*************manipulation checks****************;

TITLE 'Manip Checks';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Manip Checks.html';

proc freq data=motind3R.all; tables IMC; run;

proc sort data=motind3R.all; by condition;
proc freq data=motind3R.all; by condition;
tables manip1 manip2; run; 

proc sort data=motind3R.all; by IMC condition;
proc freq data=motind3R.all; by IMC condition;
tables manip1 manip2; run;

ODS HTML CLOSE;


*************************making new datasets to analyze data easily*********************;
data motind3R.ind; set motind3R.all; 
keep = 0; 
if majorparty = "Ind" then keep = 1; 
if keep = 0 then delete; run;

data motind3R.strong; set motind3R.ind; 
keep = 0; 
if partyforce = 0 then keep = 1; 
if keep = 0 then delete; run;

data motind3R.rep; set motind3R.all; 
keep = 0; 
if majorparty = "Rep" then keep = 1; 
if keep = 0 then delete; run;

data motind3R.dem; set motind3R.all; 
keep = 0; 
if majorparty = "Dem" then keep = 1; 
if keep = 0 then delete; run;


**********************************ANALYZING DATA**************************************;

TITLE 'Combined Sample Analysis';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Combined Analysis.html';

proc means n mean std data=motind3R.all; 
var prefermain planiat priorpref; run;

proc means n mean std data=motind3R.all (where=(majorparty NE ".")); class majorparty;
var prefermain planiat priorpref; run;

proc corr data=motind3R.all; var planiat prefermain; run;
proc sort data=motind3R.all; by majorparty; 
proc corr data=motind3R.all;  by majorparty; var planiat prefermain; run;

proc means n mean std data=motind3R.all (where=(majorparty NE ".")); class majorparty;
var partyinfluenced socialinfluenced detailsinfluenced ; run;

proc sort data=motind3R.all; by majorparty;

proc freq data=motind3R.all (where=(majorparty NE ".")); by majorparty;
tables partyinfluenced detailsinfluenced; run;

proc corr data=motind3R.all; 
var planiat prefermain socialpolitics poliat economicpolitics politics; run;

*testing hypotheses on reasoning;
proc glm data=motind3R.all (where=(majorparty NE ".")); class majorparty; 
model partyinfluenced=majorparty; means majorparty / tukey; run;

proc freq data=motind3R.all (where=(cogloadmanip = "load")); table recallright writedown; run;

ODS HTML CLOSE;



**********************************INDEPENDENTS**************************************;


*graphing the interaction NEED TO RERUN GRAPHS IF EVER PLAN TO USE THEM TO CHANGE AXES;
filename grafout 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R'; 
goptions gsfname=grafout gsfmode=replace NOFILEONLY rotate=landscape device=sasemf target=sasemf 
	gunit=pt ftext="Arial" ftitle="Arial" htext=20pt  gsfmode=replace hsize=9in vsize=6in;
goptions reset=axis;

TITLE1 "Independents IAT DV";
AXIS1 LABEL=(ANGLE=90 ROTATE=0 "Implicit Mainstream Preference")    MINOR=(n=1)  
order=-.6 to .6 by .2;
AXIS2 LABEL=("Implicit Party Identification") minor=none order=-.6 to .6 by .2 ;
legend1 label=(h=16pt j=r "Party Proposed Mainstream" position=top) shape=line(60pt) mode=share
position=(bottom right inside) across=1 
value=( h=12pt j=l "Dems Proposed Mainstream" "Reps Proposed Mainstream");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=5;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=5;
PROC GPLOT DATA=motind3R.ind; 
	PLOT	planiat*poliat=condition / noframe vaxis=axis1 haxis=axis2 legend=legend1; RUN;QUIT;

TITLE1 "Independents Explicit DV";
AXIS1 LABEL=(ANGLE=90 ROTATE=0 "Explicit Mainstream Preference")    MINOR=(n=1)  
order=1 to 7 by 1;
AXIS2 LABEL=("Implicit Party Identification") minor=none order=-.6 to .6 by .2;
legend1 label=(h=16pt j=r "Party Proposed Mainstream" position=top) shape=line(60pt) mode=share
position=(bottom right inside) across=1 
value=( h=12pt j=l "Dems Proposed Mainstream" "Reps Proposed Mainstream");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=5;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=5;
PROC GPLOT DATA=motind3R.ind;
	PLOT	prefermain*poliat=condition / noframe vaxis=axis1 haxis=axis2 legend=legend1; RUN;QUIT;

TITLE1 "Independents Explicit DV - Party Force IV";
AXIS1 LABEL=(ANGLE=90 ROTATE=0 "Explicit Mainstream Preference")    MINOR=(n=1)  
order=1 to 7 by 1;
AXIS2 LABEL=("Forced Party Identification") minor=none order= -3 to 3 by 1;
legend1 label=(h=16pt j=r "Party Proposed Mainstream" position=top) shape=line(60pt) mode=share
position=(bottom right inside) across=1 
value=( h=12pt j=l "Dems Proposed Mainstream" "Reps Proposed Mainstream");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=5;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=5;
PROC GPLOT data=motind3R.ind;  
	PLOT	prefermain*partyforce=condition / noframe vaxis=axis1 haxis=axis2 legend=legend1; RUN;QUIT;

TITLE1 "Independents IAT DV - Party Force IV";
AXIS1 LABEL=(ANGLE=90 ROTATE=0 "Implicit Mainstream Preference")    MINOR=(n=1)  
order=-.6 to .6 by .2;
AXIS2 LABEL=("Forced Party Identification") minor=none order= -3 to 3 by 1;
legend1 label=(h=16pt j=r "Party Proposed Mainstream" position=top) shape=line(60pt) mode=share
position=(bottom right inside) across=1 
value=( h=12pt j=l "Dems Proposed Mainstream" "Reps Proposed Mainstream");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=5;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=5;
PROC GPLOT data=motind3R.ind;  
	PLOT	planiat*partyforce=condition / noframe vaxis=axis1 haxis=axis2 legend=legend1; RUN;QUIT;


**************************Strong Independents***********************************;


TITLE1 "Strong Independents IAT DV";
AXIS1 LABEL=(ANGLE=90 ROTATE=0 "Implicit Mainstream Preference")    MINOR=(n=1)  
order=-.6 to .6 by .2;
AXIS2 LABEL=("Implicit Party Identification") minor=none order=-.6 to .6 by .2;
legend1 label=(h=16pt j=r "Party Proposed Mainstream" position=top) shape=line(60pt) mode=share
position=(bottom right inside) across=1 
value=( h=12pt j=l "Dems Proposed Mainstream" "Reps Proposed Mainstream");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=5;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=5;
PROC GPLOT DATA=motind3R.strong; 
	PLOT	planiat*poliat=condition / noframe vaxis=axis1 haxis=axis2 legend=legend1; RUN;QUIT;

TITLE1 "Strong Independents Explicit DV";
AXIS1 LABEL=(ANGLE=90 ROTATE=0 "Explicit Mainstream Preference")    MINOR=(n=1)  
order=1 to 7 by 1;
AXIS2 LABEL=("Implicit Party Identification") minor=none order=-.6 to .6 by .2;
legend1 label=(h=16pt j=r "Party Proposed Mainstream" position=top) shape=line(60pt) mode=share
position=(bottom right inside) across=1 
value=( h=12pt j=l "Dems Proposed Mainstream" "Reps Proposed Mainstream");
SYMBOL1 INTERPOL=R C=black line=1 mode=include w=5;
SYMBOL2 INTERPOL=R C=black line=2 mode=include w=5;
PROC GPLOT DATA=motind3R.strong;
	PLOT	prefermain*poliat=condition / noframe vaxis=axis1 haxis=axis2 legend=legend1; RUN;QUIT;



**********************************DEMOCRATS**************************************;

TITLE 'Democrats Analysis';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Democrats Analysis.html';

*test of hypothesis;
proc ttest data=motind3R.dem ; 
class condition; var prefermain planiat; run;

proc glm data=motind3R.dem; 
class condition cogloadmanip;
model prefermain=condition|cogloadmanip; run;

proc glm data=motind3R.dem; 
class condition cogloadmanip;
model planiat=condition|cogloadmanip; run;

proc means data=motind3R.dem; class cogloadmanip condition; var planiat prefermain; run;

proc sort data=motind3R.dem; by recallright; 
proc means data=motind3R.dem; by recallright; class cogloadmanip condition; var planiat prefermain; run;

*covarying DV order;
proc glm data=motind3R.dem ; class condition dvorder;
model prefermain=condition|dvorder; run;

proc glm data=motind3R.dem ; class condition dvorder;
model planiat=condition|dvorder; run;

ODS HTML CLOSE;



**********************************REPUBLICANS**************************************;

TITLE 'Republicans Analysis';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Republicans Analysis.html';

*test of hypothesis;
proc ttest data=motind3R.rep ; 
class condition; var prefermain planiat; run;

proc glm data=motind3R.rep; 
class condition cogloadmanip;
model prefermain=condition|cogloadmanip; run;

proc glm data=motind3R.rep; 
class condition cogloadmanip;
model planiat=condition|cogloadmanip; run;

proc means data=motind3R.rep; class cogloadmanip condition; var planiat prefermain; run;

*covarying DV order;
proc glm data=motind3R.rep ; class condition dvorder;
model prefermain=condition|dvorder; run;

proc glm data=motind3R.rep ; class condition dvorder;
model planiat=condition|dvorder; run;

ODS HTML CLOSE;




****Added analyses for the MI paper with CIs so had to recode variables to be numerical**********;

TITLE 'Full Sample - IAT incremental validity';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Full Sample - IAT incremental validity.html';

data motind3R.major; set motind3R.all; 
keep = 0; 
if majorparty in ("Dem", "Rep", "Ind") then keep=1; 
if keep = 0 then delete; run;

data motind3R.major; set motind3R.major; 
informat newparty 1.; 
newparty = .; 
if majorparty = "Rep" then newparty = -2; 

if majorparty = "Ind" then do; 
if indforce = "RepInd" then newparty = -1; 
else if indforce = "StrongInd" then newparty = 0; 
else if indforce = "DemInd" then newparty = 1; end; 

else if majorparty = "Dem" then newparty = 2; run;

proc freq data=motind3R.major; table newparty; run;
proc sort data=motind3R.major; by newparty; 
proc freq data=motind3R.major; by newparty; 
tables majorparty indforce; run;

proc glm data=motind3R.major; 
model prefermain=conditionnum partyinfluenced newparty; run;

proc glm data=motind3R.major; 
model prefermain=conditionnum partyinfluenced newparty poliat; run;

proc glm data=motind3R.major; 
model prefermain=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum; run;

proc glm data=motind3R.major; 
model prefermain=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum poliat*conditionnum; run;

proc glm data=motind3R.major; 
model planiat=conditionnum partyinfluenced newparty; run;

proc glm data=motind3R.major; 
model planiat=conditionnum partyinfluenced newparty poliat; run;

proc glm data=motind3R.major; 
model planiat=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum; run;

proc glm data=motind3R.major; 
model planiat=conditionnum partyinfluenced newparty poliat
partyinfluenced*conditionnum newparty*conditionnum poliat*conditionnum; run;

ODS HTML CLOSE; 



TITLE 'Rep-Dem Average Difference';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Rep-Dem Average Difference.html';
data motind3R.two; set motind3R.all; 
keep = 0; 
if majorparty in ("Dem", "Rep") then keep=1; 
if keep = 0 then delete; run;

proc ttest data=motind3R.two; class majorparty; var prefermain planiat; run;
ODS HTML CLOSE; 





TITLE 'CIs on main analyses';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\CIs on main analyses.html';

proc glm data=motind3R.ind;
model prefermain=conditionnum|poliat / CLPARM; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum|poliat / CLPARM; run;

proc glm data=motind3R.strong; 
model prefermain=conditionnum|poliat / CLPARM; run;

proc glm data=motind3R.strong; 
model planiat=conditionnum|poliat / CLPARM; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum|poliat|cogloadnum / CLPARM; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum|poliat|cogloadnum / CLPARM; run;

proc means data=motind3R.ind; class conditionnum poliatbin; var planiat prefermain; run;

ODS HTML CLOSE; 



TITLE 'Independents - IAT incremental validity WITH CIs';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Independents - IAT incremental validity WITH CIs.html';

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce / CLPARM ; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce poliat / CLPARM ; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum / CLPARM ; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum poliat*conditionnum / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce poliat / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce poliat
partyinfluenced*conditionnum partyforce*conditionnum poliat*conditionnum / CLPARM ; run;

ODS HTML CLOSE;



TITLE 'Independents - IAT incremental validity WITH CIs WITH political ideology';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Independents - IAT incremental validity WITH CIs WITH political ideology.html';

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics / CLPARM ; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics poliat / CLPARM ; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum / CLPARM ; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum poliat*conditionnum / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics poliat / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum / CLPARM ; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum partyinfluenced partyforce politics poliat
partyinfluenced*conditionnum partyforce*conditionnum politics*conditionnum poliat*conditionnum / CLPARM ; run;

ODS HTML CLOSE;




TITLE 'Awareness';
ODS HTML BODY = 'C:\Users\Carlee\Documents\Research Projects\Moderates\motivatedindependents3\analysis\motind3R\Awareness.html';

proc sort data=motind3R.all; by majorparty; 
proc means data=motind3R.all n mean std; by majorparty; class condition aware; var prefermain planiat; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=motind3R.ind; 
model prefermain=conditionnum|poliat|aware / CLPARM; run;

proc glm data=motind3R.ind; 
model planiat=conditionnum|poliat|aware / CLPARM; run;

proc glm data=motind3R.dem; 
model prefermain=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=motind3R.dem; 
model planiat=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=motind3R.dem; 
model prefermain=conditionnum|poliat|aware / CLPARM; run;

proc glm data=motind3R.dem; 
model planiat=conditionnum|poliat|aware / CLPARM; run;

proc glm data=motind3R.rep; 
model prefermain=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=motind3R.rep; 
model planiat=conditionnum|poliat|partyinfluenced / CLPARM; run;

proc glm data=motind3R.rep; 
model prefermain=conditionnum|poliat|aware / CLPARM; run;

proc glm data=motind3R.rep; 
model planiat=conditionnum|poliat|aware / CLPARM; run;

ODS HTML CLOSE; 


*removing selected demographics that could possibly be identifying for posting data;

data motind3R.post; set motind3R.all; 
drop byear bmonth dayofbirth characteristic genoccupation major reldenom  relfamily religion work  zip; run;
